//
//  YYTeamSubscribeVC.m
//  drivingSchool
//
//  Created by 子yu 刘 on 2018/8/18.
//  Copyright © 2018年 子yu 刘. All rights reserved.
//

#import "YYTeamSubscribeVC.h"

@interface YYTeamSubscribeVC ()

@end

@implementation YYTeamSubscribeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.bgView.layer.shadowOffset = CGSizeMake(1, 1);
    self.bgView.layer.shadowOpacity = 0.8;
    self.bgView.layer.shadowColor = [UIColor colorWithWhite:0.7 alpha:1].CGColor;
}

- (IBAction)subscribe:(id)sender {
    if (self.tfName.text.length == 0) {
        [AlertUtil alertMessage:@"请输入您的姓名"];
        return;
    }
    if (self.tfPhone.text.length == 0) {
        [AlertUtil alertMessage:@"请输入手机号码"];
        return;
    }
    if (self.tfCompanyName.text.length == 0) {
        [AlertUtil alertMessage:@"请输入公司名字"];
        return;
    }
    if (self.tfCount.text.length == 0) {
        [AlertUtil alertMessage:@"请输入检车数量"];
        return;
    }
    [RequestOperationManager personalTeam_number:self.tfCount.text contacts:self.tfName.text contacts_phone:self.tfPhone.text company:self.tfCompanyName.text success:^(id result) {
        if (DEF_REQ_SUCCESS) {
            [AlertUtil alertMessage:@"预约成功"];
            [self.navigationController popViewControllerAnimated:YES];
        }
        
    } failture:^(NSError *error) {
        
    }];
}


@end
